{extend name="layout/main" /}
{block name="main"}
<main class="app-content">
  <div class="app-title">
	<div>
		<h1><i class="fa fa-th-list"></i> {$title}</h1>
	  <!--<p>Basic bootstrap tables</p>-->
	</div>
	<!--
	<a href="{:url('index')}" class="btn btn-primary" >
		  <i class="fa fa-fw fa-lg fa-backward"></i>返回列表
	</a>
	-->
  </div>
  <div class="row">
	<div class="col-md-6">
	  <div class="tile">
		<div class="tile-body">
		  <form id="form">
			<div class="form-group">
			  <label class="control-label">{$tables['fields']['username']['name']}</label>
			  <input class="form-control" type="text" placeholder="" name="username" value="{$info.username}">
			</div>
			<div class="form-group">
			  <label class="control-label">{$tables['fields']['password']['name']}</label>
			  <input class="form-control" type="text" placeholder="" name="password" value="">
			</div>
			<div class="form-group">
			  <label class="control-label">{$tables['fields']['fullname']['name']}</label>
			  <input class="form-control" type="text" placeholder="" name="fullname" value="{$info.fullname}">
			</div>
			<div class="form-group">
			  <label class="control-label">{$tables['fields']['phone']['name']}</label>
			  <input class="form-control" type="text" placeholder="" name="phone" value="{$info.phone}">
			</div>
			<div class="form-group">
			  <label class="control-label">{$tables['fields']['email']['name']}</label>
			  <input class="form-control" type="text" placeholder="" name="email" value="{$info.email}">
			</div>
			<div class="tile-footer">
			  <button class="btn btn-primary" type="button" id="submitbutton">
				  <i class="fa fa-fw fa-lg fa-check-circle"></i>提交
			  </button>&nbsp;&nbsp;&nbsp;
			</div>
		  </form>
		</div>
	  </div>
	</div>
  </div>
</main>
{/block}
{block name="javascript"}
<script>
  $('#submitbutton').click(function(){
	  var url = '{:url('profile')}';
	  var param = $("#form").serialize();
	  postsave(url,param);
  });
</script>
{/block}
